package com.atguigu.scala.chapter10

/**
 * @author lizikuan
 * @date 2021/5/25 20:15
 */
object $03_ImplicitClass {
  implicit class MyOp(val self:Int){
    def myMax(x:Int)={
      if(self>x) self
      else x
    }
  }
  def main(args: Array[String]): Unit = {
    val num =10
    println(num.myMax(0))
  }
}
